import SvgIcon from '@/components/SvgIcon/index.vue'
import Category from '@/components/Category/index.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue' //注册全局element图标
import type { App, Component } from 'vue'
export default {
  install(app: App) {
    const components: { [name: string]: Component } = { SvgIcon, Category }

    Object.keys(components).forEach((item) => {
      app.component(item, components[item])
    })
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component)
    }
  },
}
